/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * 说明：
 * Entity Name 预定表
 * @Author：黄盛强
 * @Date：2012-04-11
 */
@Entity
@Table(name="ruipeng_tb_TBook")
public class TBook implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private String BookID;                //CHAR(15) NULL,预订编号
	private String UserID;                //CHAR(15) NULL,用户编号
	private Date HappenTime;            //DATETIME NULL,预订时间
	private int PersonCount;           //INTEGER NULL,预订人数
	private Date ConsumTime;            //DATETIME NULL,预订消费时间
	private String ExtContact;           // VARCHAR(20) NULL,额外联系人
	private String ExtContactPhone;       //VARCHAR(30) NULL,额外联系电话
	private String Note;                 // VARCHAR(512) NULL,其他备注
	private int Status;               // TINYINT NULL,预订状态
					//1为用户已确定	2为商家已确定（如餐馆分配了桌台）3为预定已完成
						//4为用户超时未到 -1为用户已取消	-2为商家已取消
	private String RelOrderID;           // CHAR(15) NULL,相关订单编号
	private String Reply;                // VARCHAR(512) NULL,商家回复
	private String ItemID;               // CHAR(15) NULL,预订项目
	private int ExtContactSex;         //TINYINT NULL,额外联系人性别
	private String OrderName;            // VARCHAR(20) NULL,预订人姓名
	private String OrderPhone;            //VARCHAR(30) NULL,预订人电话
	private int OrderSex;             // TINYINT NULL,预订人性别
	private int SourceType;          // TINYINT NULL,来源类型
								//1为店内订单 2为网络订单 3为电话
	private String RelID;                // CHAR(15) NULL,来源相关编号
	private Date EndTime;               //DATETIME NULL预订结束时间
	private String PosID;//实施场所ID
	
	private boolean isShow;//是否显示   不进数据库 
	
	public TBook() {
		super();
	}
	public TBook(String bookID) {
		super();
		BookID = bookID;
	}
	@Id
	@Column(name="BookID",length=15)
	public String getBookID() {
		return BookID;
	}
	public void setBookID(String bookID) {
		BookID = bookID;
	}
	
	@Column(name="UserID",length=15)
	public String getUserID() {
		return UserID;
	}
	public void setUserID(String userID) {
		UserID = userID;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HappenTime", nullable = false, length = 19)
	public Date getHappenTime() {
		return HappenTime;
	}
	public void setHappenTime(Date happenTime) {
		HappenTime = happenTime;
	}
	
	@Column(name="PersonCount")
	public int getPersonCount() {
		return PersonCount;
	}
	public void setPersonCount(int personCount) {
		PersonCount = personCount;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "ConsumTime", nullable = false, length = 19)
	public Date getConsumTime() {
		return ConsumTime;
	}
	public void setConsumTime(Date consumTime) {
		ConsumTime = consumTime;
	}
	
	@Column(name = "ExtContact",length=20)
	public String getExtContact() {
		return ExtContact;
	}
	public void setExtContact(String extContact) {
		ExtContact = extContact;
	}
	
	@Column(name = "ExtContactPhone",length=30)
	public String getExtContactPhone() {
		return ExtContactPhone;
	}
	public void setExtContactPhone(String extContactPhone) {
		ExtContactPhone = extContactPhone;
	}
	
	@Column(name = "Note",length=512)
	public String getNote() {
		return Note;
	}
	public void setNote(String note) {
		Note = note;
	}
	
	@Column(name="Status")
	public int getStatus() {
		return Status;
	}
	public void setStatus(int status) {
		Status = status;
	}
	
	@Column(name = "RelOrderID",length=15)
	public String getRelOrderID() {
		return RelOrderID;
	}
	public void setRelOrderID(String relOrderID) {
		RelOrderID = relOrderID;
	}
	
	@Column(name = "Reply",length=512)
	public String getReply() {
		return Reply;
	}
	public void setReply(String reply) {
		Reply = reply;
	}
	
	@Column(name = "ItemID",length=15)
	public String getItemID() {
		return ItemID;
	}
	public void setItemID(String itemID) {
		ItemID = itemID;
	}
	
	@Column(name="ExtContactSex")
	public int getExtContactSex() {
		return ExtContactSex;
	}
	public void setExtContactSex(int extContactSex) {
		ExtContactSex = extContactSex;
	}
	
	@Column(name = "OrderName",length=20)
	public String getOrderName() {
		return OrderName;
	}
	public void setOrderName(String orderName) {
		OrderName = orderName;
	}
	
	@Column(name = "OrderPhone",length=30)
	public String getOrderPhone() {
		return OrderPhone;
	}
	public void setOrderPhone(String orderPhone) {
		OrderPhone = orderPhone;
	}
	
	@Column(name="OrderSex")
	public int getOrderSex() {
		return OrderSex;
	}
	public void setOrderSex(int orderSex) {
		OrderSex = orderSex;
	}
	
	@Column(name="SourceType")
	public int getSourceType() {
		return SourceType;
	}
	public void setSourceType(int sourceType) {
		SourceType = sourceType;
	}
	
	@Column(name = "RelID",length=15)
	public String getRelID() {
		return RelID;
	}
	public void setRelID(String relID) {
		RelID = relID;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EndTime", length = 19)
	public Date getEndTime() {
		return EndTime;
	}
	public void setEndTime(Date endTime) {
		EndTime = endTime;
	}
	
	@Column(name = "PosID",length=15)
	public String getPosID() {
		return PosID;
	}
	public void setPosID(String posID) {
		PosID = posID;
	}
	
	@Transient
	public boolean isShow() {
		return isShow;
	}
	public void setShow(boolean isShow) {
		this.isShow = isShow;
	}
}
